02. Introduction to Workspaces

## Introduction

Udacity Workspaces are available for some projects & exercises as an alternative to manually configuring your own remote server or using your local machine. These workspaces provide a Jupyter notebook server directly in your browser. Some workspaces include GPU support, however this option is not enabled for all notebooks and will not be covered in this lesson. This lesson will briefly introduce the basic Workspaces interface.

Important Notes:

  • Workspaces sessions are connections from your browser to a remote server. There is currently no time limit imposed on basic Workspaces.
  • Workspace data is preserved between sessions (and can be reset as needed, e.g., to get project updates).
  • Workspace sessions are preserved if your connection drops or your browser window is closed, simply return to the classroom and re-open the workspace page. (NOTE: you may lose data that was not saved before the session was reset.)
  • Workspace sessions are automatically terminated after a period of inactivity.
  • The kernel state is preserved as long as the notebook session remains open, but it is not preserved if the session is closed. If you exit the notebook for more than half an hour and the session is closed, you will need to re-run any previously-run cells before continuing.

## Overview

The default workspaces interface

The default workspaces interface

When the workspace opens, you'll see the normal Jupyter file browser. From this interface you can open a notebook file, start a remote terminal session, submit your project, or reset the workspace data, and more. Clicking the three bars in the top left corner above the Jupyter logo will toggle hiding the classroom lessons sidebar.

NOTE: You can always return to the file browser page from anywhere else in the workspace by clicking the Jupyter logo in the top left corner.

## Opening a notebook

View of the project notebook

View of the project notebook

Clicking the name of a notebook (*.ipynb) file in the file list will open a standard Jupyter notebook view of the project. The notebook session will remain open as long as you are active, and will be automatically terminated after 30 minutes of inactivity.

You can exit a notebook by clicking on the Jupyter logo in the top left corner.

NOTE: Notebooks continue to run in the background unless they are stopped.

## Submitting a Project

The Submit Project Button

The Submit Project Button

Some workspaces are able to directly submit projects on your behalf (i.e., you do not need to manually submit the project in the classroom). To submit your project, simply click the "Submit Project" button (circled in red in the above image).

If you do not see the "Submit Project" button, then project submission is not enabled for that workspace. You will need to manually download your project files and submit them in the classroom.

NOTE: YOU MUST ENSURE THAT YOUR SUBMISSION INCLUDES ALL REQUIRED FILES BEFORE SUBMITTING -- INCLUDING ANY FILE CONVERSIONS (e.g., from ipynb to HTML)

## Opening a Terminal

The "New" menu button

The "New" menu button

Jupyter workspaces support several views, including the file browser and notebook view already covered, as well as shell terminals. To open a terminal shell, click the "New" menu button at the top right of the file browser view and select "Terminal".

## Terminals

Terminals provide a full Bash shell that you can use to install or update software packages, fetch updates from github repositories, or run any other terminal commands. As with the notebook view, you can return to the file browser view by clicking on the Jupyter logo at the top left corner of the window.

NOTE: Your data & changes are persistent across workspace sessions. Any changes you make will need to be repeated if you later reset your workspace data.

## Resetting Data

The "Menu" button in the bottom left corner provides support for resetting your Workspaces. The "Refresh Workspace" button will refresh your session, which has no effect on the changes you've made in the workspace.

The "Reset Data" button discards all changes and restores a clean copy of the workspace. Clicking the button will open a dialog that requires you to type "Reset data" in a confirmation dialog. ALL OF YOUR DATA WILL BE LOST.

Resetting should only be required if Udacity makes changes to the project and you can't get them via git pull, or if you destroy the contents of the workspace. If you do need to reset your data, you are strongly encouraged to download a copy of your work from the file interface before clicking Reset Data.